<?php
   //define root system dir
   define("ROOT_PATH", $_SERVER['DOCUMENT_ROOT']);
   define("CONFIG_PATH", ROOT_PATH . '/config');
   define("SYSTEM_PATH", ROOT_PATH . "/system");
   define("LOG_PATH", ROOT_PATH . '/logs');
   
   //import system class
   require_once SYSTEM_PATH . '/class/db.class.php';
   
   //import all class needed
   require CONFIG_PATH . '/version.cnf.php';
   
   //import database config
   require CONFIG_PATH . '/db.cnf.php';
   
   $select = $db->fields('person');
   //while ( $row = $select->all() ) // It's a row fetching method
      
?>